#include <iostream>
#include <unistd.h>
#include <sys/types.h>
#include <signal.h>
#include <string>

using namespace std;

void Usage(string proc)
{
    cout << "Usage:\n\t" << proc << " signum pid\n\n";
}

int main(int argc, const char* argv[])
{
    if(argc != 3)// ./mykill signum pid
    {
        Usage(argv[0]);
        exit(1);
    }

    int signum = stoi(argv[1]);
    int pid = stoi(argv[2]);

    int n = kill(pid,signum);
    if(n == -1)
    {
        perror("kill");
        exit(2);
    }
    return 0;
}